home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
os2
/
pmp43.zip
/
PMPAPI.H
< prev
next >
Wrap
C/C++ Source or Header
|
1996-07-06
|
17KB
|
293 lines
/***************************************************************************
PM Patrol API C/C++ header
API: DCFGetStats (Data Collection Facility - retrieve stats)
-----------------------------------------------------------------------------
Prototype: APIRC APIENTRY DCFGetStats (PDCFSTATS pDCFStats)
Parms: PPDCFSTATS ... Address to DCFSTATS structure
Returns: DCF_NO_ERROR ... Succesfull with no errors
DCF_PARM_ERROR ... Invalid parm specified
DCF_INACTIVE_ERROR ... DCF not active
Notes: Statistics are updated at frequencies defined in the PM Patrol
"Refresh Settings" dialog under "Settings" options.
Refer to PM Patrol on-line help for details and examples.
API: DCFVerify (Data Collection Facility - verify DCF active state)
-----------------------------------------------------------------------------
Prototype: BOOL APIENTRY DCFVerify (void)
Parms: None
Returns: TRUE ... DCF active
FALSE ... DCF not active
API: DCFUserDefined (Data Collection Facility - User defined monitor)
-----------------------------------------------------------------------------
Prototype: APIRC APIENTRY DCFUserDefined (PCHAR buffer)
Parms: None
Returns: DCF_NO_ERROR ... Succesfull with no errors
DCF_PARM_ERROR ... Invalid parm specified
DCF_INACTIVE_ERROR ... DCF not active
API: PMPShutDown (Shutdown PM Patrol and DCF)
-----------------------------------------------------------------------------
Prototype: BOOL APIENTRY PMPShutDown (void)
Parms: None
Returns: TRUE ... Succesfull with no errors
FALSE ... PM Patrol not active
****************************************************************************/
/* double inclusion */
#ifndef INCL_PMPAPI
#define INCL_PMPAPI
/* define additional types */
#if !defined(OS2_INCLUDED) && !defined(INCL_NEWTYPES1)
#define INCL_NEWTYPES1
typedef short SHORT;
typedef SHORT * PSHORT;
typedef unsigned short USHORT;
typedef USHORT * PUSHORT;
typedef long LONG;
typedef LONG * PLONG;
typedef unsigned long ULONG;
typedef ULONG * PULONG;
typedef char CHAR;
typedef CHAR * PCHAR;
typedef unsigned char UCHAR;
typedef UCHAR * PUCHAR;
typedef UCHAR BYTE;
typedef BYTE * PBYTE;
typedef int INT;
typedef INT * PINT;
typedef void VOID;
typedef VOID * PVOID;
typedef ULONG BOOL;
typedef BOOL * PBOOL;
#endif
#ifndef INCL_NEWTYPES2
#define INCL_NEWTYPES2
typedef double DOUBLE;
typedef DOUBLE * PDOUBLE;
typedef INT FD;
#ifdef UNIX
typedef INT APIRC;
typedef APIRC * PAPIRC;
typedef pid_t PID;
typedef unsigned int TID;
#ifndef APIENTRY
#define APIENTRY
#endif
#else
typedef ULONG APIRC;
typedef APIRC * PAPIRC;
typedef USHORT APIRC16;
typedef APIRC16 * PAPIRC16;
typedef USHORT HFILE16;
typedef HFILE16 * PHFILE16;
#ifndef APIENTRY
#define APIENTRY _System
#endif
#endif
#endif
/* define DCF specifics */
#define DCF_NETWID_SIZE 15
#define DCF_NETUID_SIZE 15
#define DCF_NETDID_SIZE 15
#define DCF_NETSID_SIZE 15
#define DCF_DRVONL_SIZE 26
#define DCF_GRAPH_SIZE 11
#define DCF_EXENAME_SIZE 8
#define DCF_PSTATS_SIZE 64
#define DCF_USER_SIZE 20
#define DCF_VERSION_SIZE 12
#define DCF_NO_ERROR 0
#define DCF_PARM_ERROR 1
#define DCF_INACTIVE_ERROR 2
/* structure definitions */
#pragma pack(1)
typedef struct dcfpstats
{
ULONG pid; /* process id */
ULONG ppid; /* parent process id */
ULONG sid; /* session id */
ULONG type; /* process type PROG_* */
ULONG ramSizeTot; /* tot ram allocated (pages)*/
ULONG ramSizeRes; /* tot ram resident (pages) */
BOOL mmt32Bit; /* 16 or 32-bit indicator */
USHORT modHandle; /* module handle */
USHORT tidCount; /* thread count */
USHORT semCount; /* sem count */
USHORT modCount; /* mod count */
USHORT shrCount; /* sharemem count */
USHORT maxClass; /* max thread pri class */
LONG startTime; /* start time (time_t) */
USHORT cpuPct; /* cpu percent */
USHORT runCnt; /* internal to PMP */
CHAR exeName[DCF_EXENAME_SIZE+1]; /* executable name (8.3) */
} DCFPSTATS, *PDCFPSTATS;
typedef struct dcfstats
{
CHAR pmpVersion[DCF_VERSION_SIZE+1]; /* PMP version */
LONG pmpStartTime; /* PMP start time (time_t) */
BOOL hpfs32ActInd; /* hpfs 386 active indicator*/
BOOL memActInd; /* os2memu active indicator */
BOOL mmActInd; /* mmos2 active indicator */
BOOL netActInd; /* net active indicator */
BOOL netLogonInd; /* net logged-on indicator */
BOOL lpt1ActInd; /* LPT1 monitor indicator */
BOOL lpt2ActInd; /* LPT2 monitor indicator */
BOOL lpt3ActInd; /* LPT3 monitor indicator */
BOOL spoolActInd; /* Spooler active indicator */
LONG upDateTime; /* DCF up-date time (time_t)*/
ULONG upTimeSecs; /* system up-time seconds */
ULONG inetTimeSecs; /* internet connect seconds */
CHAR netWSId [DCF_NETWID_SIZE+1]; /* net workstation id */
CHAR netUserId [DCF_NETUID_SIZE+1]; /* net logon id */
CHAR netDomainId[DCF_NETDID_SIZE+1]; /* net logon domain */
CHAR netServerId[DCF_NETSID_SIZE+1]; /* net logon server */
DOUBLE netIn; /* net req in bytes */
DOUBLE netOut; /* net req out bytes */
DOUBLE lpt1TotIO; /* lpt1 I/O total bytes */
DOUBLE lpt1TotTime; /* lpt1 total ms */
ULONG lpt1TotJobs; /* lpt1 total jobs */
DOUBLE lpt2TotIO; /* lpt2 I/O total bytes */
DOUBLE lpt2TotTime; /* lpt2 total ms */
ULONG lpt2TotJobs; /* lpt2 total jobs */
DOUBLE lpt3TotIO; /* lpt3 I/O total bytes */
DOUBLE lpt3TotTime; /* lpt3 total ms */
ULONG lpt3TotJobs; /* lpt3 total jobs */
CHAR drivesOnLine[DCF_DRVONL_SIZE+1]; /* drive map array */
CHAR drive1; /* drive letter */
BOOL drive1OffLine; /* drive off line ind